package com.gzq.singleton.practice1;

import java.util.Arrays;

public enum SingletonEnum {
	SINGLETON(4),VALUE(1);
	
	private SingletonEnum(int value) {
	}
	
	public static void main(String[] args) {
		SingletonEnum[] values = SingletonEnum.values();
		System.out.println(Arrays.toString(values));
		
		int ordinal = SingletonEnum.SINGLETON.ordinal();
		System.out.println(ordinal);
		
		SingletonEnum valueOf = SingletonEnum.valueOf("VALUE");
		System.out.println(valueOf);
		
		String name = SingletonEnum.SINGLETON.name();
		System.out.println(name);
	}
}
